package core.data;

import java.util.Map;

public class FailureResult extends DataResult{
    public static final int CODE = 400;
    public final Map<String, String> message;
    public FailureResult(Map<String, String> message, Integer code){
        super("failure", code != null ? code : FailureResult.CODE);
        this.message = message;
    }

    @Override
    public String toString(){
        return "{\"status\":\"" + this.status + "\",\"code\":" + this.code + ",\"message\":" + this.message.toString() + "}";
    }
}
